package com.hejing.Class的理解;

/**
 * ClassName: User
 * Package: com.hejing.Class的理解
 * Description:
 *
 * @Author: HeJing
 * @Create: 2023-06-03 19:36
 * @Version: 1.0
 */
public class User {
    private String name;
    public int age;

    public User() {
        System.out.println("user()...");
    }

    public User(int age) {
        this.age = age;
    }

    public User(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}























